<template>
  <div class="trpg-mode">
    <div class="mode-header">
      <h1>TRPG模式</h1>
      <p>现代在线桌面角色扮演游戏体验</p>
    </div>
    
    <div class="mode-content">
      <el-row :gutter="20">
        <el-col :xs="24" :sm="12" :md="8">
          <el-card class="feature-card">
            <template #header>
              <div class="card-header">
                <el-icon><Connection /></el-icon>
                <span>游戏房间</span>
              </div>
            </template>
            <p>创建或加入游戏房间，与其他玩家实时互动</p>
            <el-button type="primary" @click="createRoom">创建房间</el-button>
            <el-button @click="joinRoom">加入房间</el-button>
          </el-card>
        </el-col>
        
        <el-col :xs="24" :sm="12" :md="8">
          <el-card class="feature-card">
            <template #header>
              <div class="card-header">
                <el-icon><Edit /></el-icon>
                <span>模组管理</span>
              </div>
            </template>
            <p>浏览和下载社区模组，或创建自己的模组</p>
            <el-button type="primary" @click="browseModules">浏览模组</el-button>
            <el-button @click="createModule">创建模组</el-button>
          </el-card>
        </el-col>
        
        <el-col :xs="24" :sm="12" :md="8">
          <el-card class="feature-card">
            <template #header>
              <div class="card-header">
                <el-icon><UserFilled /></el-icon>
                <span>KP工具</span>
              </div>
            </template>
            <p>主持人专用工具，管理游戏进程和玩家</p>
            <el-button type="primary" @click="openKPTools">打开KP工具</el-button>
          </el-card>
        </el-col>
      </el-row>
    </div>
  </div>
</template>

<script setup>
import { ElMessage } from 'element-plus'

const createRoom = () => {
  ElMessage.info('创建房间功能开发中...')
}

const joinRoom = () => {
  ElMessage.info('加入房间功能开发中...')
}

const browseModules = () => {
  ElMessage.info('模组浏览功能开发中...')
}

const createModule = () => {
  ElMessage.info('模组创建功能开发中...')
}

const openKPTools = () => {
  ElMessage.info('KP工具功能开发中...')
}
</script>

<style scoped>
.trpg-mode {
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.mode-header {
  text-align: center;
  margin-bottom: 40px;
}

.mode-header h1 {
  font-size: 36px;
  margin: 0 0 16px 0;
  color: #333;
}

.mode-header p {
  font-size: 18px;
  color: #666;
  margin: 0;
}

.mode-content {
  margin-top: 40px;
}

.feature-card {
  height: 100%;
  margin-bottom: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
}

.card-header .el-icon {
  font-size: 20px;
  color: #667eea;
}

.feature-card p {
  color: #666;
  line-height: 1.6;
  margin: 16px 0;
}

.feature-card .el-button {
  margin-right: 8px;
  margin-bottom: 8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .trpg-mode {
    padding: 20px 10px;
  }
  
  .mode-header h1 {
    font-size: 28px;
  }
  
  .mode-header p {
    font-size: 16px;
  }
}
</style>
